﻿
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_CM_GetNewNegotiateClient]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_CM_GetNewNegotiateClient];
GO
CREATE PROCEDURE [dbo].[sproc_CM_GetNewNegotiateClient]
@begintime datetime,
@endtime datetime

AS

    SELECT * FROM UDS_CM_ClientInfo
    WHERE PATINDEX('%negotiate%',UDS_CM_ClientInfo.CurStatus)>=0
    AND Birthday between @begintime and dateadd(d,1,@endtime)